package com.hanscan.persistence.entities;

import java.io.Serializable;
import javax.persistence.*;

@Entity
@Table(name = "eventtypes")
@SequenceGenerator(name = "eventtypeGen", sequenceName = "eventtypeGen",
allocationSize = 1)
@NamedQueries(
{
    @NamedQuery(name = "getAllEventTypes",
    query = "SELECT g FROM EventType g"),
    @NamedQuery(name = "findEventTypeByValue",
    query = "SELECT u FROM EventType u " +
    "WHERE u.eventTypeValue=?1"),
    @NamedQuery(name = "findIdentifySuccessEventType",
    query = "SELECT u FROM EventType u " +
    "WHERE u.eventTypeValue=48"),
    @NamedQuery(name = "findIdentifyFailEventType",
    query = "SELECT u FROM EventType u " +
    "WHERE u.eventTypeValue=49") 
})              
public class EventType implements Serializable {
   private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.SEQUENCE,
    generator = "eventtypeGen")
    @Column(nullable = false)    
    private Long idEventType;    
    @Column(nullable = false)
    private int eventTypeValue;
    private String description;

    
    
    public EventType() 
    {
    }

    public EventType(Long idEventType) 
    {
        this.idEventType = idEventType;
    }

    public EventType(Long idEventType, int eventTypeValue, String description) 
    {
        this.idEventType = idEventType;
        this.eventTypeValue = eventTypeValue;
        this.description = description;
    }

    public String getDescription() 
    {
        return description;
    }

    public void setDescription(String description) 
    {
        this.description = description;
    }

    public int getEventTypeValue() {
        return eventTypeValue;
    }

    public void setEventTypeValue(int eventTypeValue) {
        this.eventTypeValue = eventTypeValue;
    }

    public Long getIdEventType() 
    {
        return idEventType;
    }

    public void setIdEventType(Long idEventType) 
    {
        this.idEventType = idEventType;
    }  

}
